package com.cloudkinto.service.fbaorderoutput;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.FbaOrderOutputDo;
import com.cloudkinto.service.fbaorderoutput.vo.*;
import com.cloudkinto.service.orderoutput.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-06-04
 */
public interface FbaOrderOutputService extends IService<FbaOrderOutputDo> {

    SingleResult addInit(Long currentUserId, Long companyId);

    String fbaStorageAdd(FbaOrderOutputAddReq req, Long userId);

    List<Map> computationalCosts(FbaOrderOutputComputationalCostsReq req, Long companyId);

    SingleResult updateInit(Long id,Long companyId);

    FbaOrderOutputUpdateReq update(FbaOrderOutputUpdateReq updateVo, Long userId);

    void appointmentStorageTime(FbaOrderOutputUpdateTimeReq req);

    void appointmentCarTime(FbaOrderOutputUpdateTimeReq req);

//    void cutoff(Long id, Long userId, Long companyId);

    SingleResult salesReturnInit(Long id);

//    void salesReturn(FbaOrderOutputSalesReturnReq req, Long userId, Long companyId);

    int delete(Long id, Long userId);

    FbaOrderOutputDetailRes detail(Long id, boolean b);

    SingleResult pageInit(Long companyId, Long currentUserId);

    List<FbaOrderOutputListRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    SingleResult dealwithExcel(MultipartFile file, int shopId, int storageId, Long userid, Long companyId);

    void exportExcel(Map<String, String> map, OrderOutputExcelReq req, HttpServletResponse response) throws IOException;


    List<FbaExcelImportPackageRes> importExcel(MultipartFile file, Long storageId, Long shopId, Long companyId) throws IOException;

    Object openApiUpdate(OpenAPIFbaOrderUpdateReq req, Long companyId, Long userId);

    Object openApiDelete(Long id, Long userId);

    Object openApiDelete(String orderNumber, Long userId);

    FbaOrderOutputDetailRes apiDetail(Long id);

    SingleResult tracklist(Long storageId, Long fbaStorageId, Long companyId);

    FbaOrderOutputDetailRes apiDetail(String orderNumber);

    String fbaStorageOpenAdd(FbaOrderOutputOpenAddReq req, Long userId);

}
